//////////////////////////////////////////////////////////////////////////////////
//
//	Join/Quit Messages
//		- Version 1.1
//		- 07.01.2006
//		- diamond-optic
//////////////////////////////////////////////////////////////////////////////////
//
// Information:
//
// - NO LONGER SUPPORTED
//
// - Replaces join & quit messages
//
// Changelog:
//
// - 05.13.2006 Version 1.0
//	Initial Release
//
// - 07.01.2006 Version 1.1
//	Removed #define <engine> (requires amxx 1.75 or higher)
//
//////////////////////////////////////////////////////////////////////////////////

#include <amxmodx>

public plugin_init()
{
	register_plugin("Join/Quit Messages", "1.1", "diamond-optic")
	
	register_cvar("amx_joinquit_msg_stats", "1.1", FCVAR_SERVER|FCVAR_SPONLY)
	
	register_message(get_user_msgid("TextMsg") , "block_message") 
}

public block_message()
{
    if(get_msg_argtype(2) == ARG_STRING)
	{
         new value[64]
         get_msg_arg_string(2 , value , 63)
         
	 if((equali(value , "#Game_disconnected")) || (containi(value , "joined the game")))
		return PLUGIN_HANDLED

	}
	
    return PLUGIN_CONTINUE;
}  

public client_putinserver(id)
{
	new putin_name[32]
	get_user_name(id, putin_name, 32)
	
	client_print(0, print_chat, "*  %s has joined the damn game...", putin_name)
}

public client_disconnect(id)
{
	new leave_name[32]
	get_user_name(id, leave_name, 32)
	
	client_print(0, print_chat, "*  %s is gay and left the game...", leave_name)
}
